<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<head>
<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2007. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<link rel="stylesheet" href="../../../book.css" charset="ISO-8859-1" type="text/css">
<title>Change Variable Value</title>
</head>
<body>
<h1> Change Variable Value </h1>
<p> Select the <strong>Change Value...</strong> command [ <img src="../../../images/org.eclipse.debug.ui/elcl16/changevariablevalue_co.svg" alt="Change Variable Value"> ] to open a dialog in which you can change the value of the selected variable or register.</p>
<p>In the <a href="../../../reference/views/variables/ref-variables_view.htm"><strong>Variables View</strong></a>, if variables are displayed in the column form, variable values can also can be changed by directly editing the value in the column.</p>
<p>When debugging a Java program, there are three different types of dialogs that this command can open.</p>
<p>The <strong>Change Primitive Value Dialog</strong> is used to change the value of a primitive such as an int, long, or char.</p>
<p><img src="../../../reference/views/shared/images/ref-changeprimitivevalue.PNG" alt="Change Primitive Value Dialog"></p>
<p>The <strong>Change Object Value Dialog</strong> is used to change the value of an Object. There are two forms of this dialog.</p>
<p>For most objects you must enter an expression that will be evaluated to generate the resulting value.</p>
<p><img src="../../../reference/views/shared/images/ref-changeobjectvalue.PNG" alt="Change Object Value Dialog - Expression"></p>
<p>However, when editing Java Strings, you may also enter literal text.</p>
<p><img src="../../../reference/views/shared/images/ref-changestringvalue.PNG" alt="Change Object Value Dialog - Literal Text"></p>
<p>This command applies to:</p>
<ul><li><a href="../../../reference/views/expressions/ref-expressions_view.htm"><strong>Expressions View</strong></a></li>
  <li>Registers View </li>
  <li><a href="../../../reference/views/variables/ref-variables_view.htm"><strong>Variables View</strong></a></li>
</ul>
<h3 class="related">Related tasks</h3>
<a href="../../../tasks/task-evaluating_expressions.htm">Evaluating Expressions</a>
</body>
</html>
